import request from '../request'

export function findList(params) {
  return request({
    url: '/bs-weekly-menu/findList',
    method: 'POST',
    data: params
  })
}

export function deleteFile(params) {
  return request({
    url: `/bs-weekly-menu/deleteFiles`,
    method: 'GET',
    params
  })
}

export function saveFiles(params) {
  return request({
    url: `/bs-weekly-menu/saveFiles/${params.id}`,
    method: 'POST',
    data: params.file,
    responseType: 'blob'
  })
}

export function insertMenu(params) {
  return request({
    url: 'bs-weekly-menu/insertMenu',
    method: 'POST',
    data: params.file
  })
}

export function deleteMenu(params) {
  return request({
    url: `/bs-weekly-menu/deleteMenu${params.id}`,
    method: 'DELETE',
    params
  })
}

// 编辑
export function updateMenuFiles(params) {
  return request({
    url: `/bs-weekly-menu/updateMenuFiles/${params.id}`,
    method: 'POST',
    data: params.file
  })
}
